Update heights of building structures
Deven Mistry -- 08/23/2022
For Absecon Island
Trim and add damages
- Use the CLI script to trim and add damages to the CityGML files for Absecon Island.
- There are 2 tiles which lie inside the bounding box given by Dick;
NewJersey-34001-001.gmlandNewJersey-34001-002.gml - Once these CityGML files are trimmed (and modded), the building structures are appended manually using VSCode to create
NewJersey-34001-00X_modded.gml. - This modded file is then uploaded to Cesium Ion for producing 3D Tiles.
Getting the new heights
Dealing with geojson
- Convert the modded CityGML file
NewJersey-34001-00X_modded.gmltogeojson(NewJersey-34001-00X_modded.geojson)so that, it can be read withgeopandasfor further processing. - Read the
geojsonin Google Colab usinggeopandas - Extract the columns of
gml_id,latitude,longitudeandheightfrom thegeojsonfile - ⚠️ The latitudes and longitudes are the building centroids.
- The CRS of the
geojsonis theEPSG:4979, hence it is reprojected toEPSG:6438for further calculation.
Dealing with laz files (LiDAR Data)
- Read the laz files from Google Drive. The laz files for Absecon Island are stored at
southern_nj/laz. - The tiles while only lie inside the bounding box given by Dick are uploaded on Google Drive.
- The information for the extent of the LiDAR tile lies inside the XML files.
- The XML files are stored at the location,
southern_nj/xmlin Google Drive. - The CRS of the LiDAR tile is
EPSG:6527, hence we reproject it toEPSG:6438for further calculation.
Pseudo-code for updating the heights
- Given a building centroid,
- find all tiles where any corner of a tile is closest to the building centroid
- from the resulting tileset, find the tile that the centroid lies inside
- for each tile
- find ymin, ymax, xmin, xmax
- find the tile where
- ymin < y-c < ymax and
- xmin < x-c < xmax